<?php

Class LastFM {
	
	function getSimilarArtists($artist) {
		
		$result = Array();
		
		// prepere query for sending to youtube
		$artist = urlencode($artist);
		
		// get feed
		$url = "http://ws.audioscrobbler.com/1.0/artist/$artist/similar.xml";
		$xml = FeedHelper::loadFeed($url);
		
		// loop entries
		foreach ($xml->artist as $entry) {
			$result[] = (string) $entry->name;
		}

		return $result;
		
	}
	
}

?>